package com.sky.mapper;

import com.sky.entity.DishFlavor;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author moningxi
 */
@Mapper
public interface DishFlavorMapper {
    /**
     * 批量保存菜品口味
     */
    void saveBatch(List<DishFlavor> flavors);

    /**
     * 更据菜品id集合批量删除口味
     */
    void deleteByDishIds(List<Long> ids);

    /**
     * 更据菜品id查询口味集合
     */
    @Select("select * from dish_flavor where dish_id=#{dishId}")
    List<DishFlavor> getListByDishId(Long dishId);
}
